import React from 'react'
import { View, Text, TouchableOpacity } from 'react-native'
export default (props) => {
    let { children, buttonStyle, textStyle, onPress } = props
    buttonStyle = {
        height: 40,
        backgroundColor: '#0099cc',
        borderRadius: 5,
        alignItems: 'center',
        justifyContent: 'center',
        margin: 10,
        ...buttonStyle
    }
    textStyle = {
        color: 'white',
        textAlign: 'center',
        ...textStyle
    }
    return (
        <TouchableOpacity onPress={onPress}>
            <View style={buttonStyle}>
                <Text style={textStyle}>{children}</Text>
            </View>
        </TouchableOpacity>
    )
}